package com.yunnuo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * Created by 魏洪福(15064000912@163.com) on  2018/5/25.
 */
@EnableAutoConfiguration(exclude = {SecurityAutoConfiguration.class})
@EnableJpaRepositories("com.yunnuo.*.*.dao") // JPA扫描该包路径下的Repositorie
@EntityScan("com.yunnuo.*.*.entity") // 扫描实体类
@ServletComponentScan
@SpringBootApplication
@EnableAspectJAutoProxy
public class YunnuoApplication   extends SpringBootServletInitializer {
    /**
     * @api {title} 本地启动入口
     * @apiName com.yunnuo.YunnuoApplication
     * @apiGroup main
     *
     * @apiDescription 芸诺后台管理系统本地启动方法
     */
    public static void main(String[] args) {
        SpringApplication.run(YunnuoApplication.class, args);
        System.out.println("ヾ(◍°∇°◍)ﾉﾞ  yunnuo后台管理系统启动成功    ヾ(◍°∇°◍)ﾉﾞ\n" +
                " __     __ _    _  _   _  _   _  _    _   ____  \n" +
                " \\ \\   / /| |  | || \\ | || \\ | || |  | | / __ \\ \n" +
                "  \\ \\_/ / | |  | ||  \\| ||  \\| || |  | || |  | |\n" +
                "   \\   /  | |  | || . ` || . ` || |  | || |  | |\n" +
                "    | |   | |__| || |\\  || |\\  || |__| || |__| |\n" +
                "    |_|    \\____/ |_| \\_||_| \\_| \\____/  \\____/ ");
    }
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(YunnuoApplication.class);
    }

}
